/**************************************************************************//**
 * @file     BSP_iap.h
 * @brief    Flash iap Related Config Header File
 * @version  V1.00
 * @date     25. March 2017
 *
 * @note
 *
 ******************************************************************************/
#ifndef __BSP_IAP_H__
#define __BSP_IAP_H__

/********************************************************************************
 * Include section
 *******************************************************************************/
#include <stdint.h>
#include <SC32F58128.h>

/********************************************************************************
 * Constants and macros
 *******************************************************************************/


/********************************************************************************
 * Typedefs, structs and enums
 *******************************************************************************/


/********************************************************************************
* Variables
*******************************************************************************/


/********************************************************************************
* prototypes of the functions
*******************************************************************************/
extern int NVR_Erase(void);
extern int NVR_ProgramPage (unsigned long adr, unsigned long sz, unsigned char *buf);
extern int NVR_ReadPage (unsigned long adr, unsigned long sz, unsigned char *buf);
extern int Erase_Mass(void);
extern int Erase_Sector(unsigned long adr);
extern int ProgramPage (unsigned long adr, unsigned long sz, unsigned char *buf);
extern int ReadPage (unsigned long adr, unsigned long sz, unsigned char *buf);


/*---------------------------------- End of the file ---------------------------------*/
#endif /* __BSP_UART_H__ */

